// 双端队列 普通队列和栈的结合体

class Deque {
    constructor() {
        this.count = 0;
        this.lowestCount = 0;
        this.items = {}
    }

    addFront(el) {
        if (this.isEmpty()) {
            this.addBack(el);
        } else if (this.lowestCount > 0) {
            this.lowestCount--;
            this.items[this.lowestCount] = el;
        } else {
            for (let i = this.count; i > 0; i--) {
                this.items[i] = this.items[i - 1];
            }
            this.count++;
            this.lowestCount = 0;
            this.items[0] = el;
        }
    }

    addBack() {

    }

    removeFront() {

    }

    removeBack() {

    }

    peekFront() {

    }

    peekBack() {

    }

    isEmpty() {

    }

    clear() {

    }

    size() {

    }

    toString() {

    }
}